package com.ship.common.core.utils;

import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.List;

/**
 * @author 31463
 */
public class MethodUtil {

	public static List<Method> getAllMethod(Class<?> c) {
		List<Method> methods = new ArrayList<Method>();
		while(c != null && !c.getClass().equals(Object.class)) {
			for(Method method: c.getDeclaredMethods()) {
				methods.add(method);
			}
			c = c.getSuperclass();
		}
		return methods;
	}
}
